﻿/* Developed by Aknazarov Zagir*/
using System;
using System.Windows.Forms;

namespace SimpleDayView
{
	internal partial class EditAppointmentForm : Form
	{
		public EditAppointmentForm()
		{
			InitializeComponent();
		}
		
		private Appointment _appointment; 
		
		public void SetData(Appointment appointment)
		{
			_titleTextBox.Text = appointment.Title;
			_descriptionTextBox.Text = appointment.Description;
			_appointment = appointment;	
		}
		
		private void _okBtnClick(object sender, EventArgs e)
		{
			_appointment.Title = _titleTextBox.Text;
			_appointment.Description = _descriptionTextBox.Text;
			
			Close();
		}
		
		private void _cancelBtnClick(object sender, EventArgs e)
		{
			Close();
		}
	}
}
